package org.jeecgframework.web.material.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecgframework.poi.excel.annotation.ExcelEntity;
import org.jeecgframework.web.system.pojo.base.TSUser;

/**   
 * @Description: 产品入库
 * @date 2015-08-19 09:51:09
 * @version V1.0   
 *
 */
@Entity
@Table(name = "product_input", schema = "")
@SuppressWarnings("serial")
public class ProductInputEntity implements java.io.Serializable {
	//ID
	private java.lang.String id;
	//产品ID
	@ExcelEntity()
	private PProductEntity productId;
	//入库数量
	@Excel(name="入库数量")
	private java.lang.Integer inputAmount;
	//是否是预入库
	@Excel(name="是否是预入库",replace = {"是_1","否_2"})
	private java.lang.String beforeInput;
	//备注
	private java.lang.String remark;
	//入库人
	private TSUser inUser;
	//入库日期
	private java.util.Date inDate;
	//公司ID
	private CompanyEntity companyId;
	
	/**
	 *get方法: 取得ID
	 */
	@Id
	@GeneratedValue(generator = "paymentableGenerator")
	@GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
	@Column(name ="ID",nullable=false,length=32)
	public java.lang.String getId(){
		return this.id;
	}

	/**
	 *set方法: 设置ID
	 */
	public void setId(java.lang.String id){
		this.id = id;
	}
	/**
	 *get方法: 取得产品ID
	 */
	@OneToOne(fetch=FetchType.EAGER)
	@JoinColumn(name="PRODUCT_ID")
	public PProductEntity getProductId(){
		return this.productId;
	}

	/**
	 *set方法: 设置产品ID
	 */
	public void setProductId(PProductEntity productId){
		this.productId = productId;
	}
	/**
	 *get方法: 取得入库数量
	 */
	@Column(name ="INPUT_AMOUNT")
	public java.lang.Integer getInputAmount(){
		return this.inputAmount;
	}

	/**
	 *set方法: 设置入库数量
	 */
	public void setInputAmount(java.lang.Integer inputAmount){
		this.inputAmount = inputAmount;
	}
	/**
	 *get方法: 取得是否是预入库
	 */
	@Column(name ="BEFORE_INPUT")
	public java.lang.String getBeforeInput(){
		return this.beforeInput;
	}

	/**
	 *set方法: 设置是否是预入库
	 */
	public void setBeforeInput(java.lang.String beforeInput){
		this.beforeInput = beforeInput;
	}
	/**
	 *get方法: 取得备注
	 */
	@Column(name ="REMARK",nullable=true,length=45)
	public java.lang.String getRemark(){
		return this.remark;
	}

	/**
	 *set方法: 设置备注
	 */
	public void setRemark(java.lang.String remark){
		this.remark = remark;
	}
	
	
	/**
	 * @return the inUser
	 */
	@OneToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="IN_USER")
	public TSUser getInUser() {
		return inUser;
	}

	/**
	 * @param inUser the inUser to set
	 */
	public void setInUser(TSUser inUser) {
		this.inUser = inUser;
	}

	/**
	 * @return the inDate
	 */
	
	@Column(name="IN_DATE")
	public java.util.Date getInDate() {
		return inDate;
	}

	/**
	 * @param inDate the inDate to set
	 */
	public void setInDate(java.util.Date inDate) {
		this.inDate = inDate;
	}

	/**
	 *get方法: 取得公司ID
	 */
	@OneToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="COMPANY_ID")
	public CompanyEntity getCompanyId(){
		return this.companyId;
	}

	/**
	 *set方法: 设置公司ID
	 */
	public void setCompanyId(CompanyEntity companyId){
		this.companyId = companyId;
	}
}
